home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / aie8911.zip / LISTING.6 < prev    next >
Text File  |  1989-08-28  |  479b  |  21 lines

  1.  
  2.  
  3.  
  4.                      Listing 5
  5.  
  6.                 FINDING SENTENCE PARTS
  7.  
  8.  
  9. action( Command, Action) :-
  10.       string_search( $ $, Command, Pos),
  11.       substring( Command, 0, Pos, Action).
  12.  
  13. object( Command, Object) :-
  14.       string_search( $ $, Command, Pos),
  15.       Pos1 is Pos+1,
  16.       string_length( Command, L),
  17.       O_lnth is L - Pos1,
  18.       substring( Command, Pos1, O_lnth, Object ).
  19.  
  20. ---------------- end of listing -----------------------------------
  21.